package com.yby.dome6;

public class Test {
    public static void main(String[] args) {

        Ostrich ostrich = new Ostrich();
        ostrich.fly();
        Pigeon pigeon = new Pigeon();
        pigeon.fly();
        //验证鸵鸟是鸟
        if (ostrich instanceof Bird){
            System.out.println("鸵鸟是鸟的子类，所以鸵鸟是鸟");
        }
    }
}
